package work1.guess;

public class Guess {
    private int random;
    private int num=0;
    private int sum;

    public void setNum(int num) {
        this.num = num;
    }

    public int getNum() {
        return num;
    }

    public void setRandom(int random) {
        this.random = random;
    }

    public int getRandom() {
        return random;
    }
    public int randoms(){
         sum=(int)(Math.random()*100);
        return sum;
    }
    void gues(int number){
        if (number>sum){
            System.out.println("bigger");
        }
        else if (number<sum){
            System.out.println("smaller");
        }
        else {
            System.out.println("bingo");
        }
        num++;
    }
    void tip(){
        System.out.println("请输入你猜测的值");
    }
}
